package com.similarworld.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.similarworld.dao.AbstractDAO;
import com.similarworld.dao.CategoryDao;
import com.similarworld.model.Category;
import com.similarworld.type.CategoryStatus;

@Service
public class CategoryService extends AbstractService<Category> {

	@Autowired
	CategoryDao dao;
	
	@Override
	protected AbstractDAO<Category> getDAO() {
		return dao;
	}

	public List<Category> getActiveCategories(Integer count) {
		return dao.getCategories(CategoryStatus.APPROVED, count);
	}
	
}
